--- import { type CollectionEntry, getCollection } from "astro:content"; import Comments from "../../components/Comments.astro"; import Layout from "../../layouts/BaseLayout.astro"; import blogPostSchema from "../../utils/schemas/blogPostSchema"; import dayjs from "dayjs"; type Props = CollectionEntry<"blog">; export async function getStaticPaths() { const posts = await getCollection("blog", ({ data }) => { return data.draft !== true; }); return posts.map((post) => ({ params: { slug: post.slug }, props: post, })); } const post = Astro.props; const { Content, remarkPluginFrontmatter } = await post.render(); const description = post.data.description; const isBasedOn = post.data.basedOn; const lang = post.data.lang; const slug = post.slug; const title = post.data.title; const dateModified = post.data.dateModified?.toISOString(); const datePublished = post.data.datePublished.toISOString(); const formattedDate = dayjs(post.data.datePublished.toString()).format("MMMM DD, YYYY"); const schema = blogPostSchema({ siteUrl: new URL("/", Astro.site).toString(), title, description, slug, datePublished, dateModified, lang, isBasedOn, }); ---

{title}

Posted  •  {remarkPluginFrontmatter.minutesRead}